using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Mvc.Mailer;
using System.Net.Mail;
using MobileWebsiteGenerator.Entities;
using MobileWebsiteGenerator.Models;

namespace MobileWebsiteGenerator.Mailers
{
    public class UserMailer : MailerBase, IUserMailer
    {
        public UserMailer() :
            base()
        {
            MasterName = "_Layout";
        }


        public virtual MailMessage Welcome(Customer customer)
        {
            var mailMessage = new MailMessage { Subject = "Welcome" };

            mailMessage.To.Add(customer.Email);
            ViewBag.Data = customer.Password;
            ViewBag.Data1 = customer.Email;

            PopulateBody(mailMessage, viewName: "Welcome");

            return mailMessage;
        }








        public virtual MailMessage ForgotPass(Customer customer)
        {
            var mailMessage = new MailMessage { Subject = "shivamitsolution" };

            mailMessage.To.Add(customer.Email);
            ViewBag.fullname = customer.FullName;
            ViewBag.Data = customer.Password;
            ViewBag.Data1 = customer.UserName;

            PopulateBody(mailMessage, viewName: "ForgotPassword");

            return mailMessage;
        }

        public virtual MailMessage ContactUs(ContactUs contactus)
        {
            var mailMessage = new MailMessage { Subject = "Thanks For Contacting Us" };

            mailMessage.To.Add(contactus.Email);
            ViewBag.fullname = contactus.Name;
            ViewBag.Data = contactus.Email;
            ViewBag.Data1 = contactus.Message;



            PopulateBody(mailMessage, viewName: "ContactUS");

            return mailMessage;
        }





        public virtual MailMessage GoodBye()
        {
            var mailMessage = new MailMessage { Subject = "GoodBye" };


            mailMessage.To.Add("some-email@example.com");
            ViewBag.Data = "";
            PopulateBody(mailMessage, viewName: "GoodBye");

            return mailMessage;
        }


    }
}